Skip to content

[Kernel][SM70] Default 8 KiB TP4 push all-reduce - #299

Merged
yangzhuxinyzx merged 9 commits into
mainfrom
agent/v100-dsv4-pp2tp4-exact-hotpath-20260825-172438
Aug 25, 2026
Merged

yangzhuxinyzx merged 9 commits into
mainfrom
agent/v100-dsv4-pp2tp4-exact-hotpath-20260825-172438

Conversation

@yangzhuxinyzx

@yangzhuxinyzx yangzhuxinyzx commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Purpose

Extend the existing two-epoch SM70 TP4 push collective to the exact 8-KiB FP16 decode payload and default it under the validated inference-engine contract.

Admission depends only on SM70 capability, fully connected TP4, active CUDA Graph capture, FP16 dtype, and an exact 8-KiB or existing 80-KiB payload. Other devices, topologies, dtypes, sizes, and eager calls retain the pull collective. Runtime selection does not inspect model, checkpoint, model_type, or architecture identity. VLLM_SM70_TP4_PUSH_ALLREDUCE=0 is the rollback.

Four CTAs cover all 512 packed elements of the 8-KiB payload. The existing allocation is sized for the larger 80-KiB route, so the new dispatch adds no buffer growth.

Performance and numerical result

  • Same-binary TP4 A/B/B/A: 9.286--9.425 us -> 3.041--3.174 us.
  • Matched endpoint: 59.160 -> 61.272 token/s (+3.57%), 16.903 -> 16.321 ms/token (-0.583 ms/token).
  • Dynamic CUDA Graph gate: 43 nodes x 8 changing patterns x 64 replays x 4 ranks, zero mismatches.
  • Push and pull are bitwise equal to the explicit fixed-order rank-0-through-rank-3 FP32 accumulation oracle.

Independent unchanged control processes produce different internally stable greedy streams because of pre-existing cross-process TurboMind autotuning. Since the collective is isolated by a bitwise operator oracle, those token hashes are diagnostic and not a greedy-identity quality gate.

Test Plan

  • Verify default-on and explicit rollback resolution.
  • Run focused custom-allreduce allocator coverage.
  • Run changed-file static gates and Clang formatting.
  • Reuse the recorded bounded V100 source build, dynamic graph, exactness, and endpoint evidence; do not repeat broad model E2E.

Test Result

  • Focused tests: 14 passed.
  • Changed-file pre-commit: passed, including Ruff, Clang format, Markdown lint, mypy, SPDX, and repository policy hooks.
  • git diff --check: passed.
  • Added-line identity/private-path audit: no findings.
  • A new GPU run was not started because all eight V100s are owned or reserved by unrelated live tasks; no process was interrupted.

yangzhuxinyzx and others added 9 commits August 26, 2026 01:37
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Adds opt-in selector-alignment capture and analysis without changing the default inference hot path.\n\nSigned-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Enable the validated capability- and shape-bounded SM70 long-prefill GQA route by default, with exact fallback on typed workspace OOM.\n\nSigned-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Add capability-based prompt lookup while applying proposals only when the full DFlash2 query can be skipped.\n\nSigned-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Expose explicit per-request OCR resolution and bounded crop controls without any model/checkpoint identity defaults. Keep the existing gundam behavior as the default and use one processor instance for producer/counting consistency.\n\nTests: 24 focused processor tests passed; changed-file pre-commit passed. The all-files CI failure modified 227 historical baseline files with zero overlap with this PR.\n\nSigned-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Default the measured SM70 QPN8 and metadata-free PP wins only under exact device/topology/concurrency/operator/tensor contracts, with explicit rollback and TurboMind fallback. Add matched aggregate-quality tooling that reports directional sample flips without requiring greedy identity.\n\nPerformance: QPN8 +8.63%; static PP adds 0.22%. Paired GSM8K remains 63/64 with zero invalid answers; operator outputs are finite with rel-L2 <= 6.05e-4 and max-abs <= 0.00390625.\n\nTests: 47 focused tests and changed-file pre-commit passed. The all-files CI failure modified 226 historical baseline files with zero overlap with this PR.\n\nSigned-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
@yangzhuxinyzx yangzhuxinyzx changed the title [Kernel][SM70] Optimize exact PP2 TP4 decode hot paths [Kernel][SM70] Default 8 KiB TP4 push all-reduce Aug 25, 2026
@yangzhuxinyzx
yangzhuxinyzx marked this pull request as ready for review August 25, 2026 19:08
@yangzhuxinyzx
yangzhuxinyzx merged commit 5cdb630 into main Aug 25, 2026
1 of 2 checks passed
@yangzhuxinyzx
yangzhuxinyzx deleted the agent/v100-dsv4-pp2tp4-exact-hotpath-20260825-172438 branch August 26, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants